home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Business / Random / PC to Mac Conversion / PC2MAC.ASC next >
Text File  |  1992-02-15  |  79KB  |  1,723 lines

  1.    
  2.    PC TO MAC CONVERSIONS
  3.    =====================
  4.    Basic Conversions from a DOS Viewpoint
  5.    --------------------------------------
  6.    By Nancy Jacobsen
  7.    
  8.    (Presented at Fox Software Developers Conference, October 1990. 
  9.    Updated thereafter.)
  10.    
  11.    I. INTRODUCTION
  12.    ===============
  13.    
  14.    "FoxBASE+ applications from DOS must work immediately and 
  15.    perfectly under FoxBASE+/Mac -- no sweat, no excuses."
  16.    -- Fox Software, FoxBASE+/Mac Users Guide
  17.    
  18.    The above quote is Fox Software's statement of philosophy about 
  19.    running DOS programs on a Macintosh. As a philosophy this is 
  20.    admirable, and, in my opinion, sincere -- unfortunately, it is 
  21.    not necessarily *true* in practice. It *can* be true, but I'd 
  22.    guess that any reasonably sophisticated, complicated, or lengthy 
  23.    program developed in DOS will run into at least a few problems 
  24.    when ported to the Mac.
  25.    
  26.    In all fairness, given the complexity of moving a program between 
  27.    two such diverse platforms, I think that Fox has done an 
  28.    outstanding job. Just to be able to do it at all... and the fact 
  29.    that, indeed, most of a DOS program ports unchanged is quite an 
  30.    achievement.
  31.    
  32.    Right up front, I want to say that this presentation does not 
  33.    deal with advanced, or even advanced intermediate, Mac interface 
  34.    issues, such as event driven programming and interface design 
  35.    elements. This presentation is concentrated on the basics -- how 
  36.    to move a program over to the Mac with the least amount of hassle 
  37.    and the best possible results in the prevailing circumstances.
  38.    
  39.    A. Purpose of this Presentation 
  40.    -------------------------------
  41.    
  42.    This presentation has two main purposes:
  43.    
  44.    *  To provide a logistical framework which will help you plan a 
  45.    basic conversion from an existing FoxBASE+ MSDOS program to a 
  46.    Macintosh program.
  47.    
  48.       When I started out, I didn't really know enough about the 
  49.    Macintosh or PC to Macintosh conversions to actually plan my 
  50.    conversion. I ended up making many decisions out of last minute 
  51.    necessity rather than as part of some pre-defined plan of action. 
  52.    However, I think it would have helped if I'd had some guidelines, 
  53.    especially with regard to reaching a reasonable stopping point.
  54.    
  55.    *  To provide detailed information on the mechanics of moving a 
  56.    program to the Mac, including how to handle certain, relatively 
  57.    small, problems which can otherwise drive a person crazy.
  58.    
  59.       Details like this may be, frankly, a little boring, although 
  60.    knowing about them in advance can save you a lot of time, 
  61.    possibly a very great deal of time. I have tried to include 
  62.    everything I wish *I'd* known when I started out.
  63.    
  64.    1. Point of View
  65.    ----------------
  66.    
  67.    When the Mac first came out, or rather, I suppose the Lisa, I was 
  68.    very curious about it since it could do so many interesting 
  69.    things, especially with graphics and desk top publishing. 
  70.    However, I couldn't justify the cost and, in time, similar 
  71.    programs were developed for the PC which were totally adequate 
  72.    for my needs. Not only was I very DOS oriented, but I knew how 
  73.    hard it is sometimes to adapt to a new machine -- even so 
  74.    apparently simple a matter as a new keyboard can cause great 
  75.    frustration. So I was very reluctant to consider porting my 
  76.    existing application to the Macintosh. However, I produce a 
  77.    vertical market application for newspapers and other 
  78.    publications. A lot of these businesses are moving entirely to 
  79.    Macs, driven by the desk top publishing features, and naturally 
  80.    many want to deal with only one kind of hardware. Although I was 
  81.    resisting, a move to the Mac was looming. As usual, I finally 
  82.    made the effort when someone paid me extra up front to figure it 
  83.    out. 
  84.    
  85.    In the past few years, the Mac has gained more and more of a 
  86.    footing in the business world. Although, from a DOS viewpoint, we 
  87.    may never really want to develop for Mac, it is beginning to make 
  88.    sense economically to port existing PC applications to it, 
  89.    especially since Fox makes it relatively easy. 
  90.    
  91.    I still am not particularly comfortable or thrilled with the Mac. 
  92.    I use it only for the Mac version of my software. There have been 
  93.    times when I was so frustrated I could have kicked it across the 
  94.    room. For those of you who are DOS people, you should know that 
  95.    not everyone loves the Mac and, indeed, you don't have to. And 
  96.    some of you *will* love it. For those of you who are "coming 
  97.    from" a Mac background and think whatever you think about DOS, 
  98.    this presentation may help you to understand that certain people 
  99.    don't love the Mac like you do and can get cranky about it. Their 
  100.    reasons aren't totally without merit. Neither are yours for your 
  101.    Mac preference. With any luck, there's room for both points of 
  102.    view. 
  103.    
  104.    2. Personal and Project Background
  105.    ----------------------------------
  106.    
  107.    Obviously, where I was coming from in terms of personal 
  108.    experience and the nature of the conversion project at hand 
  109.    affected what in fact got done and colored my experience of the 
  110.    affair. 
  111.  
  112.    At the time, I had 7 years of CP/M and DOS experience. I had *no* 
  113.    Mac experience except for some similar interfaces like GEM 
  114.    (Ventura) and various DOS paint and draw programs. So I knew a 
  115.    little about scrolling and mousing, but not a lot. With all 
  116.    that's written about how *easy* the Mac is to operate, I was 
  117.    surprised and somewhat dismayed to discover how much there was to 
  118.    learn. Quite a few things seemed very tedious and cumbersome to 
  119.    me. They still do.
  120.    
  121.    My resources were limited. I didn't have a lot of time and I had 
  122.    a deadline looming (the sad byproduct of up front motivation). I 
  123.    didn't have a lot of money, but I had to buy a Mac and the Mac 
  124.    Fox products, plus all the little incidentals like disks and disk 
  125.    boxes. I didn't even have space to put the Mac when I got it. 
  126.    Eventually it settled down but only after a massive 
  127.    reorganization. And, finally, my brain was pretty thoroughly 
  128.    occupied already. It's hard to tackle this kind of project when 
  129.    there are a lot of distractions.
  130.    
  131.    The project itself was a problem. It was originally written in 
  132.    dBASE II six years previously by another programmer so there were 
  133.    still pockets of code that I didn't understand. It was big -- 1.7 
  134.    megabytes of compiled code, about 40,000 lines. It was single- 
  135.    and multi- user. It was accounting software so that any changes 
  136.    needed to be made very carefully and thoroughly tested. And, 
  137.    finally, it needed to work on a wide variety of hardware -- from 
  138.    the low end up on either Mac or PC. 
  139.    
  140.    II. LOGISTICAL FRAMEWORK
  141.    ========================
  142.    
  143.    A. How Mac to Make It? 
  144.    ----------------------
  145.    
  146.    "But, obviously, nobody wants to run applications on the Mac that 
  147.    look like DOS applications." -- Fox Software, FoxBASE+/Mac Users 
  148.    Guide. 
  149.    
  150.    Normally, I would say "Don't get me started on this," but I'm 
  151.    being paid here to get started on this. For the moment, let's 
  152.    just say with regard to the discussion at hand, that it wasn't 
  153.    obvious to *me*, and that for a lot of practical reasons, running 
  154.    a program on a Mac that looks like DOS may be *necessary*, at 
  155.    least in the short term.
  156.    
  157.    Indeed, the fundamental question you need to ask in a PC to Mac 
  158.    conversion is "How Mac to Make it?"
  159.    
  160.    The answer to this question is based on an analysis of 
  161.    interrelated factors which combine to affect the amount of 
  162.    resources (work and expense) that will be required for a proposed 
  163.    conversion. These in turn must be weighed against the resources 
  164.    that are *available*.
  165.    
  166.    Based on your conclusions, you should have at least a rough idea 
  167.    how to proceed, including having answers to such questions as:
  168.    
  169.    *  How Mac to Make It? -- including How Mac *can* I make it?; 
  170.    What can be done now or in the short term? What can or should be 
  171.    postponed until later?
  172.    
  173.    *  Should I proceed at all? -- any PC to Mac conversion is going 
  174.    to require at least a certain amount of work. If one of the 
  175.    factors described later requires a great deal of work, and your 
  176.    resources are severely limited, a conversion may not be 
  177.    practical. 
  178.    
  179.    *  Should I try to maintain one program which can be transferred 
  180.    to the Mac or should I maintain two separate versions?
  181.    
  182.    B. Decision Factors
  183.    -------------------
  184.    
  185.    There are three main factors that affect the quantity of 
  186.    resources that will be required to convert a PC program to the 
  187.    Mac. Aspects of all these factors will be covered throughout this 
  188.    presentation, but to summarize, these factors are: 
  189.    
  190.    *  How Mac to you want or need the program to be?
  191.    
  192.    *  How PC is the program now? Indeed, how PC are *you* now?
  193.    
  194.    *  How large, how complex and how volatile is the program?
  195.    
  196.    As a rule of thumb, a small- to medium- sized, plain vanilla PC 
  197.    program that looks a *lot* like DOS on the Mac will be a fairly 
  198.    easy project. As a program gets bigger, more complex, uses more 
  199.    PC specific features, and looks more and more Mac-like, the 
  200.    harder the project's going to be. 
  201.    
  202.    1. How Mac do want or need the program to be? 
  203.    ---------------------------------------------
  204.    
  205.    The Mac interface is quite different from the PC interface, not 
  206.    only visually but in what it allows a user to do. Visually, the 
  207.    Mac emphasizes pull down menus, windows, radio buttons, dialogue 
  208.    boxes, alerts, fancy fonts, and a wealth of other features not 
  209.    available on DOS in FoxBASE+. The interface also tends to allow 
  210.    users more flexibility in what they're doing at any point in 
  211.    time, for instance, interrupting one task to do something else.
  212.    
  213.    FoxBASE+/Mac supports these features on the Mac, but it does so 
  214.    by using commands and command options that do not exist in 
  215.    FoxBASE+/PC. Consequently, installing all these features in an 
  216.    existing program can be very, very time consuming. However, 
  217.    installing *some* of these features isn't too hard.
  218.    
  219.    How do you know how Mac you want or need it to be (and 
  220.    consequently how much work is involved)?
  221.  
  222.    You should be aware that Apple is pretty picky about the Mac 
  223.    interface. Their point is to make all Mac applications behave in 
  224.    approximately the same way to make it easier for users. In the 
  225.    Mac world there are certain people, sometimes referred to as the 
  226.    "interface police," who come down pretty hard on any application 
  227.    that doesn't adhere strictly to Apple's interface design 
  228.    guidelines -- especially an application that looks like DOS in 
  229.    anyway. (You can get a sense of their attitude from miscellaneous 
  230.    comments around the FoxBASE+/Mac documentation.) Software dealers 
  231.    can be particularly nasty about this and may reject your 
  232.    application on this basis alone -- no matter how useful it is. 
  233.    
  234.    On the other hand, the end users of an application may not care 
  235.    too much, if at all, and, in some cases, may even like a few 
  236.    DOS-like features. Usually the end user's primary concern is 
  237.    whether an application will get the job done. 
  238.    
  239.    You might also consider *how* an application will be used. If the 
  240.    application is one that is used all the time and intensively, 
  241.    it's consistency with other Mac programs is not as important. 
  242.    However, if it's used occasionally as one of many Mac programs, 
  243.    consistency becomes more desirable.
  244.    
  245.    So, you need to look at the nature of your product and who you're 
  246.    selling it to. If it's a generic type of application that will be 
  247.    used occasionally by end users and is sold primarily through 
  248.    dealers, a greater degree of Mac interface compatibility is 
  249.    desirable. However, if it's a vertical market application that 
  250.    will be used a lot by the end user, and is marketed directly *to* 
  251.    the end user, a greater amount of interface flexibility is 
  252.    possible.
  253.    
  254.    2. How PC is the program now? How PC are *you*?
  255.    -----------------------------------------------
  256.    
  257.    Since Fox did such a good job of ensuring Mac compatibility, the 
  258.    current PC-ness factor is the least burdensome of the three 
  259.    factors we need to consider. However, it can trip you up if 
  260.    you've written a *lot* of very PC-specific code. The three main 
  261.    areas to watch out for are:
  262.    
  263.    *  Extended characters -- the MSDOS extended character set is 
  264.    different and more comprehensive than the Mac extended character 
  265.    set. Line and box drawing characters, in particular, can be a 
  266.    problem because there are no Mac equivalents. In fact there are 
  267.    no Mac equivalents for a great many of the DOS extended 
  268.    characters. If you use extended characters a lot, watch out. 
  269.    Related to this issue is that functions like INKEY() may return 
  270.    different values than they do on the PC.
  271.    
  272.    *  Non-supported commands and functions -- Although FoxBASE+/Mac 
  273.    supports the vast majority of FoxBASE+/DOS commands and 
  274.    functions, it does not support them all. If you are unfortunate 
  275.    enough, say, to have an application that uses the RUN command 500 
  276.    times, you'll need to do some major rethinking. I *did* have a 
  277.    module like that and I *still* haven't dealt with the issue.
  278.    
  279.    *  Printing -- the Mac prints things differently than DOS does. 
  280.    Certain printing tasks (ones you don't even think about with 
  281.    DOS), like printing a sample form to allow forms alignment, take 
  282.    some tricks to achieve on the Mac.
  283.    
  284.    How PC are *you*? If you've been doing DOS for awhile and you're 
  285.    comfortable with DOS commands and the way DOS programs work, it 
  286.    is going to take awhile to learn and adapt to the Mac way of 
  287.    doing things. A lot of Mac stuff seems unbearably tedious to me 
  288.    (point and click, point and click, *point and click*) and some 
  289.    simple tasks are hard to do (like copying files). It helps if you 
  290.    have some familiarity with graphic interfaces on the PC (like GEM 
  291.    or the paint and draw programs), but one way or another, you'll 
  292.    have some adjustments to make.
  293.    
  294.    3. How large, how complex, and how volatile is the program? 
  295.    -----------------------------------------------------------
  296.    *  How large? It's pretty obvious that 30,000 lines of code is 
  297.    going to take longer to convert than 1,000 lines of code -- just 
  298.    the file transfer time is going to be longer, if nothing else. If 
  299.    you've got 30,000 lines of code and want to make the application 
  300.    totally Mac, you've got a whopper of a project ahead of you.
  301.    
  302.    *  How complex? A complex program is *always* harder to change 
  303.    and maintain. So, basically any changes of any kind that are 
  304.    required by a Mac conversion will take some careful 
  305.    consideration. More than that, if you go the whole Mac route and 
  306.    start incorporating event driven programming and the like, this 
  307.    area will get *very* complicated, *very* quickly with *very* 
  308.    serious (and not always obvious) consequences if you do it wrong. 
  309.    
  310.    *  How volatile? How much and how often does the program change? 
  311.    This factor addresses the longer term implications of converting 
  312.    to Mac, as well as how Mac to make it. Basically, do you want to 
  313.    develop one application that can be used interchangeably on both 
  314.    platforms or do you want to maintain two completely separate 
  315.    versions?
  316.    
  317.       If you have a program that is changed a lot and/or has large 
  318.    changes (lots of new features, for example), it would be a lot 
  319.    easier if it could be maintained on one platform and then ported 
  320.    over to the other. In this case, the same code would need to 
  321.    accommodate both Mac and DOS conditions. The more Mac you make 
  322.    it, the harder this is to do and the larger the code becomes ("if 
  323.    DOS, do this menu, otherwise do that menu"). Moreover, Mac data 
  324.    entry screens, for example, especially those using fancy fonts 
  325.    and buttons, are very difficult to design without using the Mac 
  326.    screen designer. This means that you'd have to design a screen on 
  327.    the PC, then design it again on the Mac, and then transfer the 
  328.    code to the master program. What a headache! Although I think 
  329.    this will get easier with future Fox releases. 
  330.    
  331.       But, unless the Mac specific code causes your program to 
  332.    become very large, one version should be easier to maintain than 
  333.    trying to maintain two separate versions. If you *do* decide on 
  334.    separate versions, be sure to debug your PC program as thoroughly 
  335.    as possible before making the conversion. 
  336.    
  337.    C. Available Resources
  338.    ----------------------
  339.    
  340.    Once you've got an approximate idea of the resources you're going 
  341.    to need, you've got to look at what resources you've *got*. A Mac 
  342.    conversion is going to take:
  343.    
  344.    *  Time -- Learning time. Programming time. Testing time -- I 
  345.    tested *everything* all over again on the Mac and it was a very 
  346.    good thing I did. Documentation time. 
  347.    
  348.       Do *not* expect to complete a Mac conversion before you go on 
  349.    vacation in two weeks -- give yourself plenty of leeway.
  350.    
  351.    *  Money -- Hardware and software. Training. New documentation 
  352.    printing costs. Disks and disk labels. 
  353.    
  354.       You also need to consider the possibility of engaging others 
  355.    to do some of the work. I say if you've got the money, hire a 
  356.    FoxBASE+/Mac expert to do the conversion and maintain the 
  357.    program, but if you don't, you may still be able to parcel out 
  358.    some of the tasks. In my case I originally teamed up with just 
  359.    such a person and he handled all the initial things like 
  360.    physically moving it to the Mac and figuring out some of the 
  361.    programming tricks. But I still had to do all of the testing, and 
  362.    eventually it got easier to just change things myself rather than 
  363.    having him do it. I don't regret doing it this way. Although, in 
  364.    the end, I had to learn it all anyway, a lot of the things he did 
  365.    would have taken me a very long time to figure out by myself. 
  366.    Moreover, when I *did* have to learn it, it was much easier to 
  367.    work from something that was already started. Finally, being a 
  368.    Mac novice, I was glad for a little hand holding at the 
  369.    beginning.
  370.    
  371.    *  Space -- A simple thing, perhaps, but I had a real problem 
  372.    figuring out where to put the Mac. It ended up on the dining room 
  373.    table until Christmas dinner, moved into my husband's office, and 
  374.    finally came to rest in my own office (after a substantial amount 
  375.    of reorganization). 
  376.    
  377.    *  Brain Power -- We're all smart -- that's why we're here right 
  378.    now -- but, face it, we all have limits and a Mac conversion 
  379.    requires *attention*. Try to clear the decks of other projects 
  380.    before you start so you can concentrate, and keep distractions to 
  381.    a minimum.  
  382.    
  383.    D. Scope of Presentation
  384.    ------------------------
  385.  
  386.    This presentation is going to concentrate on the low end: a very 
  387.    basic conversion. I'll start by covering the mechanics of just 
  388.    getting an application over to the Mac and working. Then I'll 
  389.    throw in some hints for making an application as Mac-like as 
  390.    possible with as little work as possible. There's a lot of fairly 
  391.    easy stuff that can make a nice difference. The result will not 
  392.    pass an interface police raid, but it will work.
  393.    
  394.    My approach will work pretty well for large, complicated and 
  395.    volatile programs, and for developers, especially the single 
  396.    person shop, without a lot of resources. I will, for the most 
  397.    part, be leaving out advanced Mac features, especially those 
  398.    which are not supported in DOS and aren't backwardly compatible. 
  399.    
  400.    III. BASIC CONSIDERATIONS
  401.    =========================
  402.    
  403.    In this section we'll deal with the basics of just getting a 
  404.    program over to the Mac and working, with a few hints on easy 
  405.    ways to achieve a Mac-like look. The points I cover here will 
  406.    affect your conversion plans and resource requirements.
  407.    
  408.    A. Equipment
  409.    ------------
  410.    
  411.    You'll need a Mac, of course. And you need to learn how to use 
  412.    it. Here, for the benefit of the complete Mac novice, I'll 
  413.    briefly share some things I learned that were really useful.
  414.    
  415.    *  In general I would say get the best Mac you can afford, but if 
  416.    you want to keep developing on the PC and the Mac will not be 
  417.    used very often, you probably don't need a II. An SE or even a 
  418.    Plus should work fine. (However, I read recently that these two 
  419.    will be phased out with the introduction of the low-end Macs.) 
  420.    Also don't forget that all Macs are not alike. If you're 
  421.    developing applications that you want to run on any Mac, you may 
  422.    have to identify the lowest common denominator. I've got one: Mac 
  423.    Plus -- small screen, no function keys, no help key, no escape 
  424.    key, 800K floppy drive. Actually, this machine works fine for me 
  425.    except for one thing. Although I have 2.5 megabytes of RAM, 
  426.    editing large files is *extremely* slow. I can press a key and 
  427.    literally sit back and wait for it to type. 
  428.    
  429.    *  RAM -- Fox tech support says that monochrome Macs require 840K 
  430.    of free RAM, a color Mac needs 1.2M of free RAM (without Multi-
  431.    finder). If you or one of your users loads a lot of desk 
  432.    accessories on a machine, 1 megabyte of RAM on a monochrome 
  433.    system may not be enough. Keep in mind that Apple is working on a 
  434.    new version of its operating system (System 7) which is supposed 
  435.    to take more memory when, if ever, it is released.
  436.    
  437.    *  Immediately get a program like Mac Tools Deluxe (formerly PC 
  438.    Tools for the Mac). This program contains an easy file copy 
  439.    program (including being able to make multiple copies of floppy 
  440.    disks for distribution -- invaluable), a backup program, data 
  441.    recovery features and other useful things. Copying files is a 
  442.    hassle on the Mac (*moving* files is easy), but Mac Tools works 
  443.    great for this.
  444.    
  445.    *  Learn the keyboard shortcuts! Continuously pointing at menus 
  446.    with the mouse and *pulling* them down is really tedious. 
  447.    However, most programs have at least some keyboard shortcuts 
  448.    which usually mean pressing a combination of the Command key and 
  449.    a letter. Not only is a lot of mousing often tedious, but it can 
  450.    sometimes make your wrists hurt like heck. Change your mouse hand 
  451.    from time to time and take lots of Vitamin B-6.
  452.    
  453.       Update note: There's a program called Quickeys by CE softare 
  454.    that allows you create keyboard macros to replace a lot of the 
  455.    mouse stuff. I haven't tried it, but it sounds great.
  456.    
  457.    *  If all those icons are driving you crazy, select View by Name 
  458.    from the desktop menu.
  459.    
  460.    B. Physical Transfer of Files
  461.    -----------------------------
  462.    
  463.    I'm not going to spend a lot of time on this. There are a number 
  464.    of ways to physically transfer files from the PC to the Mac (your 
  465.    hardware dealer should be able to help you):
  466.    
  467.    *  Outside Conversion and/or Floppy Disks -- There are many 
  468.    service companies that will transfer data from PC disks to Mac 
  469.    disks. Also, some Macs can read PC formatted 3 1/2 inch floppy 
  470.    disks either with an internal floppy drive or an external device. 
  471.    I'd say this latter method is only practical if you personally 
  472.    have both a Mac that can do this and a PC that writes to 3 1/2 
  473.    inch disks. Otherwise, the additional cost and inconvenience of 
  474.    using a conversion service to transfer files to a Mac floppy 
  475.    would almost certainly justify the purchase of an inexpensive 
  476.    serial data link program.
  477.    
  478.    *  Serial Data Links -- There are several serial data link 
  479.    programs which can be used to transfer files. These programs 
  480.    connect a Mac to a PC with a cable. I use Laplink Mac III and 
  481.    have been very happy with it. It not only allows me to transfer 
  482.    PC programs to the Mac, but allows me to transfer files back to 
  483.    the PC (for instance, screen shots for documentation). The 
  484.    program is inexpensive, easy to use, and comes complete with all 
  485.    the cables and connectors you'll need. 
  486.    
  487.       If your PC and your Mac both have modems, you can use modem 
  488.    communications software to transfer the files, but Laplink Mac, 
  489.    for instance, uses a much higher transfer rate (115,200 baud).
  490.    
  491.    *  Networks -- If you can afford a network to connect your PC's 
  492.    and Macs together, then use one to transfer your data. A little 
  493.    too expensive and complicated for the smaller developer, perhaps.
  494.    
  495.    C. Compatibility
  496.    ----------------
  497.    FoxBASE+/Mac is compatible with all FoxBASE+/PC files: programs, 
  498.    databases, index files, memo files, format files, label 
  499.    definition files, report format files and memory variable files 
  500.    except:
  501.    
  502.    *  Compiled (.FOX) files: These will not run on a Mac. Transfer 
  503.    your .PRG files to the Mac and re-compile them.
  504.    
  505.    *  Program (.PRG) files: A few commands and functions in the 
  506.    program files are unsupported, and you'll find a few other 
  507.    inconsistencies (discussed later).
  508.    
  509.    *  dBASE III Index (.NDX) files: need to be converted to Fox 
  510.    index format. Fox .IDX files are fine.
  511.    
  512.    *  Report format (.FRM) files: FoxBASE+/Mac documentation says 
  513.    that a report which is 132 characters long will require some 
  514.    modification in the Mac product. I don't know why and didn't try 
  515.    it.
  516.    
  517.    *  Memory variable (.MEM) files: screen-type memory variables 
  518.    (SAVE SCREEN TO var) are not compatible.
  519.    
  520.    *  DOS batch (.BAT) files are, of course, not supported and there 
  521.    doesn't seem to be any real equivalent. Too bad, in my opinion.
  522.    
  523.    1. Miscellaneous 
  524.    ----------------
  525.    
  526.    On DOS machines each line in a text file is terminated by a 
  527.    carriage return followed by a line feed. Macs use only a carriage 
  528.    return. So programs should be transferred to the Mac with the 
  529.    line feed stripped out. Lap Link III will do this for you. All 
  530.    other files should be transferred "as is" in binary format.
  531.    
  532.    Mac files keep track of which application created them. When 
  533.    programs and other files initially get to the Mac, they haven't 
  534.    been flagged with this information yet, and won't be until 
  535.    they've been used. This means that when you're trying to open a 
  536.    file or do a program that hasn't been flagged yet, it won't show 
  537.    up in FoxBASE+/Mac's file finder dialogue boxes. You can, 
  538.    however, click on the All Files check box and select the desired 
  539.    file from there.
  540.    
  541.    Mac program files are quite different than FoxBASE+/PC program 
  542.    files: the source code and compiled code are kept together all in 
  543.    the same file. I personally find this very annoying. For one 
  544.    thing it takes up tons of disk space. For runtime distribution, 
  545.    you can strip out the source code, but you can never strip out 
  546.    the compiled side. What's more every time you edit a program 
  547.    file, the whole thing compiles again (actually, you can turn this 
  548.    off temporarily, but it will compile again when the program 
  549.    runs). If your procedure files are really large, this can take 
  550.    quite awhile and quickly becomes very tedious. Basically, this is 
  551.    another topic that you shouldn't get me started on. 
  552.    
  553.    However, one quick way to make sure your programs can be found by 
  554.    the Fox file finder dialogues is to immediately compile them all 
  555.    once they've been transferred using the COMPILE options (look 
  556.    this up in the manuals). When you're editing and compiling 
  557.    automatically, FoxBASE+/Mac will flag errors and transfer you to 
  558.    the edit window for corrections. This does not happen when you 
  559.    use a COMPILE option. If you want to catch possible compilation 
  560.    errors, edit and save each program.
  561.    
  562.    I also think it would be wise to immediately reindex all database 
  563.    files. It didn't happen very often, but both myself and one of my 
  564.    users (who transferred files from a PC) lost index files. I don't 
  565.    know why this happened but I think if they are reindexed on the 
  566.    Mac it might prevent it.
  567.    
  568.    Program Naming -- You can take advantage of Mac file names (more 
  569.    about this later) by renaming your applications so they are more 
  570.    descriptive. For instance, my program is called DISPLAY/390. In 
  571.    DOS I had to refer to it as D390 or DISPLAY, but on the Mac, I 
  572.    renamed it to ".DISPLAY/390". 
  573.    
  574.    Why the initial period? My program has a lot of procedure files 
  575.    and they all get lumped into the same folder, usually along with 
  576.    FoxBASE+/Mac, several data folders, and miscellaneous .MEM files. 
  577.    One nice thing about DOS is that batch files can really shelter 
  578.    users from all your program and miscellaneous files -- they don't 
  579.    see them unless they do a directory. 
  580.    
  581.    With the Mac, the user sees *all* the files in the folder. You 
  582.    can use a utility like Mac Tools to hide the ones you don't want 
  583.    visible, but for support purposes, it's sometimes helps if you 
  584.    can have the user tell you what files are there. Not only does 
  585.    the user see all the files, but they can be displayed by icon 
  586.    which is very confusing with a lot of files. So what I do is to 
  587.    name my application so that it alphabetizes at the beginning of 
  588.    the file list and have users set the desktop view to "VIEW BY 
  589.    NAME". I also include a little separator file named "=========" 
  590.    that divides the programs they're supposed to use from the 
  591.    procedures that they shouldn't touch. The value of this is that a 
  592.    user can run your program by double clicking on the program -- 
  593.    which is now easily accessible at the top of the list. 
  594.    
  595.    D. Program Initializing Code
  596.    ----------------------------
  597.    
  598.    In your master program, if you're hoping to develop one program 
  599.    that will run on both machines, while your setting up your 
  600.    environment, establishing public variables, etc., you'll want to 
  601.    establish a public variable to indicate whether the program is 
  602.    running on a Mac or not plus various other initialization 
  603.    routines for the Mac or PC, depending. Examples of this kind of 
  604.    code are included in the sample program and also discussed later.
  605.    To establish whether the program is running on a Mac, use the 
  606.    SYS(17) function:
  607.    
  608.    PUBLIC mmac 
  609.    mmac=.f.
  610.    IF SYS(17)='68000' .OR. SYS(17)='68010' .OR. SYS(17)='68020' ;
  611.       .OR. SYS(17)='68030' 
  612.        mmac=.t. ENDIF
  613.    
  614.    From now on when you need to make logic branches depending on 
  615.    whether the program is running on the Mac, you can use:
  616.    
  617.    IF mmac
  618.       DO this
  619.    ELSE
  620.       DO theother
  621.    ENDIF
  622.    
  623.    E. File naming
  624.    --------------
  625.    
  626.    File naming is covered pretty thoroughly in the User's Guide and 
  627.    I'll basically leave it to you to figure it out (this may not be 
  628.    easy, I still have trouble with this one). However, let me share 
  629.    one or two things that I've learned.
  630.    
  631.    1. Macintosh File/Folder Names
  632.    ------------------------------
  633.    
  634.    What we call sub-directories on the PC, the Mac calls folders -- 
  635.    basically they're the same kind of animal. The Mac uses colons to 
  636.    separate the folder and file names whereas the PC uses 
  637.    backslashes. (For example, the Mac equivalent of 
  638.    C:\DATA\ACCOUNT.DBF would be C:DATA:ACCOUNT.DBF). Mac folder and 
  639.    file names can be quite lengthy and contain almost any characters 
  640.    including spaces. There are several consequences to this:
  641.    
  642.    *  The most important, and the one that causes the most trouble 
  643.    for the DOS person, is that any Mac folder/file names that 
  644.    contain or *may* contain spaces, must be enclosed in quotation 
  645.    marks (except sometimes -- see SET PATH). So, if for instance you 
  646.    are using a macro to designate path names, say &FLE.DATA.DBF, you 
  647.    will need to use "&FLE.DATA.DBF". If you add the quotes to your 
  648.    DOS code, it will run just fine. 
  649.    
  650.    *  If you allow users to enter a path/folder name (say upon 
  651.    installation) to tell the program where files are located, you 
  652.    may need to increase the size of the variable to accommodate 
  653.    longer names. Similarly if you provide a mask in the form "C:\    
  654.    \", you will want to change that for Mac users (I found it was 
  655.    easiest simply to eliminate the mask altogether on the Mac).
  656.    
  657.    *  If your program looks for backslashes in path names for any 
  658.    reason, you may need to change that too for use on the Mac.
  659.    
  660.    2. File Name Translation
  661.    ------------------------
  662.    
  663.    As you'll see in the User's Guide, FoxBASE+/Mac has several ways 
  664.    of dealing with path and file name translation which can be 
  665.    helpful to you depending on how your code is written now. 
  666.    
  667.    *  Dos Filename Conversion -- If you have hardcoded all your 
  668.    path/file names, the Mac will automatically translate them to the 
  669.    Mac. So if you refer specifically to a file C:\DATA\CUSTOMER.DBF, 
  670.    the Mac should handle this just fine, *as long as* you have a 
  671.    hard drive called "C", and a folder called "DATA" on your Mac. 
  672.    There are some pitfalls to this, check out the User's Guide 
  673.    carefully. To avoid any confusion during filename conversion, 
  674.    always refer to files by their fully specified pathname. 
  675.    
  676.    *  Set Volume To -- This is a really neat option *if* you refer 
  677.    to files by drive designation only, for example C:ACCOUNT.DBF, 
  678.    which you may do if you have an application left over from double 
  679.    floppy days. Unfortunately, neither FoxBASE+/PC nor Foxpro/PC 
  680.    (1.02) support this command (it would be a very handy feature if 
  681.    they did) so it doesn't help you maintain one program for both 
  682.    platforms. 
  683.    
  684.    *  Set Path -- This operates in a mysterious way. As far as I can 
  685.    tell, you *do not* use quotes around the path, even if a folder 
  686.    name contains spaces. If your path is stored in a macro, don't 
  687.    place quotes around this either. The easiest way to figure out 
  688.    what to use is to use the View window to set the path and then 
  689.    see what shows up in the Command window. 
  690.    
  691.    *  Macros -- These work just fine, just be sure to enclose them 
  692.    all in quotes (except for use with SET PATH).
  693.    
  694.    F. Unsupported Commands and Functions
  695.    -------------------------------------
  696.    
  697.    Here's a list of commands and functions not supported in 
  698.    FoxBASE+/Mac 2.01. Commands and functions that are ignored need 
  699.    not be commented out -- they simply produce no effect.
  700.    
  701.    RUN -- use of this will produce an error "Feature not supported."
  702.    
  703.    DISPLAY HISTORY -- ignored, but if sent from the command window, 
  704.    it activates the screen while others have no effect at all -- I'd 
  705.    comment this out where it occurs to avoid possible problems.
  706.    
  707.    LIST HISTORY -- ignored
  708.    
  709.    SET COLOR ON/OFF -- ignored
  710.    
  711.    SET DEBUG ON/OFF -- ignored
  712.    
  713.    SET DELIMITERS ON/OFF -- ignored
  714.    
  715.    SET DELIMITERS TO -- ignored
  716.  
  717.    SET HISTORY ON/OFF -- ignored
  718.    
  719.    SET HISTORY TO -- ignored
  720.    
  721.    SET MENU ON/OFF -- ignored
  722.    
  723.    SET MESSAGE TO -- ignored
  724.    
  725.    GETENV() -- will be ignored, but it will catch and report an 
  726.    error if you use it wrong (e.g. GETENV(13))!
  727.    
  728.    SYS(13) -- This always returns "ready" no matter what the printer 
  729.    status.
  730.    
  731.    SYS(2000) -- ignored
  732.    
  733.    SYS(2001) -- ignored
  734.    
  735.    SYS(2002) -- ignored
  736.    
  737.    SYS(2003) -- ignored
  738.    
  739.    1. Undocumented Commands
  740.    ------------------------
  741.    
  742.    Interface No-No's
  743.    
  744.    In some documentation you may see that the following commands are 
  745.    not supported, although they are. In general they are supported 
  746.    reluctantly, being considered by the interface police to be 
  747.    "inappropriate" to the Mac environment, but they're supported 
  748.    well and will save you a lot of time if they're left alone. They 
  749.    are included in the Mac command set so reluctantly that they 
  750.    aren't included in the on line help file or the manuals.
  751.    
  752.    @...MENU / READ MENU TO 
  753.    
  754.    @...PROMPT / MENU TO
  755.    
  756.    READ MENU BAR TO
  757.    
  758.    @...BOX
  759.    
  760.    ACCEPT .. TO
  761.    
  762.    SET STATUS ON/OFF
  763.    
  764.    2. Other Commands
  765.    -----------------
  766.    
  767.    The following command was at one time reported as unsupported, 
  768.    but it is.
  769.    
  770.    LOAD/CALL/RELEASE MODULE
  771.  
  772.    G. ASCII and Key Support
  773.    ------------------------
  774.    
  775.    Since the Mac and PC ASCII codes are different, this naturally 
  776.    will affect any code that relies on a PC ASCII code that doesn't 
  777.    exist on the Mac. Mac ASCII codes only go up to 216 while PC goes 
  778.    up to 255 and they do not always have equivalent values. Related 
  779.    to this is that the PC has many more keys than simpler Mac 
  780.    keyboards. I've never seen an extended Mac keyboard, but my Plus 
  781.    doesn't have the following commonly used keys: ESCAPE (which can 
  782.    be emulated with Command Period), HOME, END, PGDN, PGUP, INSERT, 
  783.    DEL, or FUNCTION KEYS.
  784.    
  785.    When you are trapping key presses, you will have to bear these 
  786.    facts in mind and make adjustments as necessary. For instance, 
  787.    the ON KEY = command and the INKEY() function are both affected. 
  788.    The READKEY() keycode values appear to be identical for both the 
  789.    Mac and the PC, where equivalent keys exist.
  790.    
  791.    Another thing to be wary of is the use of ASCII characters to 
  792.    place markers in fields or variables. If you routinely use 
  793.    something like CHR(255) as a marker, you'll need to change this. 
  794.    
  795.    Function keys don't exist on all Mac keyboards. On some machines 
  796.    (not the Plus) they can be emulated by pressing the Command key 
  797.    and a number, e.g. Command 1 = Function Key 1. Any SET FUNCTION # 
  798.    TO X command should work with this setup. However, there are no 
  799.    key code values for command/number combinations so it is not 
  800.    possible to use the ON KEY command with function keys on these 
  801.    machines.
  802.    
  803.    Trying to write generic code to run under all these varied 
  804.    conditions is a little difficult. I was hoping that I'd be able 
  805.    to use the FKMAX() function to check for function key 
  806.    availability or equivalents. Unfortunately, on my Plus this 
  807.    returned a value of 12 -- even though there were no function keys 
  808.    available in any form -- not helpful.
  809.    
  810.    H. Screens
  811.    ----------
  812.    
  813.    For the most part, DOS program screens translate directly to the 
  814.    Macintosh. However, with a little attention to screens, you can 
  815.    introduce a pleasant degree of Mac-ness without much bother. 
  816.    
  817.    Further attention needs to be paid to a few DOS commands that can 
  818.    cause trouble on the Mac, and, if your DOS program uses a lot of 
  819.    boxes and extended characters, you may need to resolve some 
  820.    problems with the way the Macintosh handles these items.
  821.    
  822.    1. Basic Screen Characteristics 
  823.    -------------------------------
  824.    
  825.    If you run a PC application on the Mac, the FoxBASE+/Mac uses 
  826.    screen defaults that will accommodate your application -- that 
  827.    is, it uses, for instance, a font that will show 80 columns on 
  828.    the screen. But, although you don't really have to do anything to 
  829.    make a program run, screens are such a basic element of the Mac, 
  830.    that it's a good idea to figure them out, even if you keep them 
  831.    simple. 
  832.    
  833.    According to the manual, FoxBASE+/Mac has nine available screens 
  834.    in which input and output can be performed. However, for easy 
  835.    porting of a DOS application, you will need to be concerned with 
  836.    only one, and it's easiest to make this Screen 1 which is the 
  837.    default.
  838.    
  839.    In the initializing portion of your code, you will need to 
  840.    establish the characteristics of this screen which you do using 
  841.    the SCREEN command.
  842.    
  843.    Here's an example of a basic screen command:
  844.    
  845.    SCREEN TYPE 8 AT 0,0 FONT "Monaco", 9 HEADING "Program Title" ;
  846.           LOCK
  847.    
  848.    Since we are dealing with default Screen 1, the screen number has 
  849.    been omitted. If you are creating other screens, you will need to 
  850.    add the screen number to the command, e.g.:
  851.    
  852.    SCREEN 2 TYPE 4 FONT "Geneva",12
  853.    
  854.    TYPE -- There are six screen types which feature different 
  855.    combinations of features (zoom, close, resize, etc.) and borders. 
  856.    Type 8 (the default) is a very Mac-like screen type. Types 8, 4 
  857.    and 16 allow you to place a title on the screen which looks very 
  858.    nice. These types can also be moved. Types 1, 2 and 3 cannot be 
  859.    moved, resized, zoomed or closed, and they do not allow for 
  860.    titles. The ability to resize or zoom a screen is probably 
  861.    immaterial to a basic DOS conversion; however it is nice to give 
  862.    the user a chance to move the screen if desired (especially if 
  863.    the user is using a larger Mac monitor).
  864.    
  865.    AT -- This option allows you to position the screen. If you omit 
  866.    this option, the Mac positions the screen in the upper left 
  867.    corner of the monitor. Mostly, you won't need to care about this 
  868.    except that the "0,0" option will center (vertically and 
  869.    horizontally) the screen on the monitor. This is pleasing on the 
  870.    small Mac monitor for those who appreciate symmetry and could be 
  871.    quite dramatic on a larger monitor.
  872.    
  873.    FONT -- For quick conversion of a DOS program to the Mac, you 
  874.    should choose a fixed-width screen font in an appropriate size. 
  875.    If your program will be distributed to users with a variety of 
  876.    Macs, you should also choose one that is common to all machines 
  877.    and fits on the smallest Mac screen. Two fonts that meet these 
  878.    needs are 9 point Monaco (the default) and 10 point Courier. I 
  879.    prefer Monaco since it seems easier to read. Most of the screen 
  880.    examples used here, except for examples using the IBMKlone font, 
  881.    use Monaco. The IBMKlone Font is based on Courier. 
  882.    
  883.    The IBMKlone Font, a shareware font that comes with FoxBASE+/Mac, 
  884.    is also available and may be the font of choice for some 
  885.    applications. However, this font has some problems and is not 
  886.    really recommended. When I tried calling the developer, he'd 
  887.    moved and did not return my call. I've heard that there are other 
  888.    fonts that emulate DOS, but don't personally know of one. 
  889.    
  890.    If you are running your program on a Mac with a larger monitor, 
  891.    or if you never use the full 80 column DOS screen width, you may 
  892.    be able to use a font in a larger point size or a bold version of 
  893.    the same font size.
  894.    
  895.    The name of the font should be enclosed in quotes followed by a 
  896.    comma and point size:
  897.    
  898.    FONT "Monaco",9
  899.    
  900.    Important note: If you are not printing directly to the COM port 
  901.    (for reasons explained in the Printing section), your printed 
  902.    output will be in the same font and size as your screen font. If 
  903.    you are using 9 point Monaco, this means that your reports will 
  904.    not take up the entire width of the page. Consequently, you may 
  905.    want to change the screen font before printing jobs (and change 
  906.    it back before returning to screen output). More on this when we 
  907.    get to printing.
  908.    
  909.    HEADING -- This option places a title at the top of the screen 
  910.    for screen types 8, 4 and 16. You can use your program name or 
  911.    the names of procedures. This is a simple way of making your 
  912.    program look more Mac-like. The title should be enclosed in 
  913.    quotes:
  914.    
  915.    HEADING "Program Name
  916.    
  917.    LOCK -- This is important when using screen types 8, 4 or 16 
  918.    which normally allow the user to close the screen by clicking on 
  919.    the close box. If this happens during the normal use of a DOS 
  920.    converted program ("Gee, what happens if I click this box?"), the 
  921.    screen disappears and can't be retrieved, though it may reappear 
  922.    if the program encounters another screen command! Input can still 
  923.    be carried out, but can't be seen, so the user simply has to 
  924.    muddle through and hope to find a way out of the program. 
  925.    
  926.    Note: Whenever you issue a SCREEN command (say to change the 
  927.    screen font) always issue the LOCK command at the same time to 
  928.    avoid this problem. You'll see examples of this in the sample 
  929.    program.
  930.    
  931.    2. Color 
  932.    --------
  933.    
  934.    I don't have a color Mac so I don't know what happens with SET 
  935.    COLOR TO commands on them. I'd hope that they'd translate 
  936.    directly. However, the colors you've developed for the PC may not 
  937.    be similar to Mac color standards. You may need to check out some 
  938.    color Mac programs and see what they use. 
  939.    
  940.    On the monochrome Mac, the operation of color commands is a 
  941.    little more complicated. If you were smart enough to use macros 
  942.    for colors on the PC (and guess who wasn't), shifting to the Mac 
  943.    shouldn't be too problematical. An example of the code for this 
  944.    is included in the sample program. If, on the other hand, you 
  945.    have lots of specific SET COLOR TO commands, it's kind of a 
  946.    headache.
  947.    
  948.    First, it appears that *any* kind of SET COLOR TO [something] 
  949.    command will disable bar highlights in @...PROMPT menus on 
  950.    monochrome Macs. If you have @...PROMPT menus, about the only 
  951.    thing you can do is to retroactively use macros or comment out 
  952.    all SET COLOR TO commands. Second, some SET COLOR TO commands 
  953.    have a weird affect on GETS. The effect on GETS is terribly 
  954.    confusing. The monochrome Mac appears to ignore all color pair 
  955.    settings except those with a standard foreground of "W" ("W+" is 
  956.    okay). And it appears to ignore any enhanced color pair sets. For 
  957.    example both the following commands will SAY *and* GET black text 
  958.    on white
  959.    
  960.    SET COLOR TO B/N,N/W 
  961.    SET COLOR TO W+/B,W/N
  962.    
  963.    Both the following commands will SAY *and* GET white text on 
  964.    black and any CLEAR command issued with these color settings will 
  965.    clear the screen black:
  966.    
  967.    SET COLOR TO W/N,N/W
  968.    SET COLOR TO W/B,W/N
  969.    
  970.    The easiest way of dealing with this problem is simply to change 
  971.    all occurrences of W/? to something else. If you *want* to have 
  972.    white on black text for emphasis somewhere, be sure to change to 
  973.    another color pair before issuing a CLEAR command.
  974.    
  975.    Note: The ISCOLOR() function will return True on some Mac 
  976.    monochrome monitors. Don't know why. This could make it difficult 
  977.    to write generic color code for all possible machines.
  978.    
  979.    3. Set Intensity
  980.    ----------------
  981.    
  982.    The SET INTENSITY ON command will cause all GETs on the Mac to 
  983.    execute in white on black which isn't very pleasing. If this 
  984.    command is used in your DOS code, you'll want to comment it out 
  985.    in the Mac version or use it only if the program is not running 
  986.    on the Mac. If you see a sudden change in your GETs to white on 
  987.    black, look for this command or a SET COLOR TO W/? as the 
  988.    culprit.
  989.    
  990.    4. Cursor Control
  991.    -----------------
  992.    
  993.    The SYS(2002) function which turns the cursor on and off in DOS 
  994.    has no effect in the Mac version.
  995.    
  996.    5. Boxes
  997.    --------
  998.    
  999.    FoxBASE+/Mac supports both the DOS DOUBLE and BOX commands for 
  1000.    drawing boxes, with some odd variations. In general, when you 
  1001.    have used either of these commands to draw boxes, you can leave 
  1002.    your code unchanged.
  1003.    
  1004.    The DOUBLE command will produce double bordered boxes well, 
  1005.    although box intersections show up as three lines rather than two 
  1006.    as in DOS. 
  1007.    
  1008.    The BOX command is undocumented in the FoxBASE+/Mac manual and 
  1009.    produces a single border no matter what characters you originally 
  1010.    used in DOS. Here too, box intersections show up differently -- 
  1011.    as a double line rather than a single line.
  1012.    
  1013.    If you want to eliminate the different box intersection 
  1014.    characteristics, you can place boxes on top of each other rather 
  1015.    than "stacking" them. For instance, the code
  1016.    
  1017.    @  1, 1 TO 15,79 DOUBLE  && Stacked boxes
  1018.    @ 15, 1 TO 20,79 DOUBLE
  1019.    
  1020.    will look different on a Mac than:
  1021.    
  1022.    @  1, 1 TO 20,79 DOUBLE  && Overlapping boxes
  1023.    @ 15, 1 TO 20,79 DOUBLE
  1024.    
  1025.    with the latter code producing the "cleaner" appearance. Both 
  1026.    code sequences look the same in DOS.
  1027.    
  1028.    If you have drawn a box in DOS and want to divide it from edge to 
  1029.    edge with a horizontal or vertical line using the BOX or DOUBLE 
  1030.    command, this line will look better on the Mac using BOX than 
  1031.    DOUBLE (where the line overlaps the edge on the left or top). 
  1032.    
  1033.    Boxes that have been drawn with extended characters do not 
  1034.    translate to the Mac. If you use a lot of boxes drawn this way, 
  1035.    you may want to investigate the IBMKlone Font which does this job 
  1036.    okay. However, it doesn't work quite as well when combined with 
  1037.    boxes drawn with BOX and DOUBLE. Other DOS emulating fonts may 
  1038.    work better. 
  1039.    
  1040.    6. Extended Characters
  1041.    ----------------------
  1042.    
  1043.    The Mac extended character set is quite different from the IBM 
  1044.    extended character set. Notably, it has far fewer graphics 
  1045.    characters. If you have used a lot of extended characters for 
  1046.    special effects, you will need to eliminate them, find a Mac 
  1047.    equivalent, or use a DOS emulating font which handles them well.
  1048.    
  1049.    The quickest way to handle the problem is simply to eliminate 
  1050.    them from your Mac code. This is made simpler if you use the 
  1051.    CHR() function in your DOS code rather than typing the character 
  1052.    in directly. This way you can do a global search on "CHR(". 
  1053.    
  1054.    If you want your Mac and DOS code to handle both cases, you can 
  1055.    use the IIF() function:
  1056.    
  1057.    *** the variable MAC is true if running on a Mac
  1058.    *** when there is a Mac equivalent:
  1059.    @ 1,10 SAY IIF(mac,CHR(165),CHR(248))  && produces a bullet
  1060.    *** when there is no Mac equivalent:
  1061.    @ 2,10 SAY IIF(mac,'',CHR(16))       && using null string for Mac
  1062.    
  1063.    According to Fox documentation, even if you use the IBMKlone 
  1064.    Font, four characters produce different graphics on the Mac than 
  1065.    they do on the PC. These are CHR(8), CHR(9), CHR(10), and 
  1066.    CHR(127). Keep an eye out for them.
  1067.    
  1068.    7. Examples
  1069.    -----------
  1070.    
  1071.    Examples of the different way the Mac handles boxes and extended 
  1072.    characters may be found in the sample program.
  1073.    
  1074.    I. Menus
  1075.    --------
  1076.    
  1077.    Although my first impression (based on early documentation) was 
  1078.    that most FoxBASE+/PC menu options were not supported, eventually 
  1079.    it turned out that most of them *were* and, in most cases, 
  1080.    supported rather nicely. However, except for the bar-type menu at 
  1081.    the top of the screen (READ MENU BAR TO on the PC), these menus 
  1082.    are "frowned on" by the interface police who are rather snooty 
  1083.    about them, if you ask me. I do not like Mac-style menus. I just 
  1084.    plain don't like how they work. If we have time later, you can 
  1085.    get me started on this, but now let's keep to business.
  1086.    
  1087.    Here are some basic PC menus and how to deal with them (samples 
  1088.    of all menus except "enter choice" are included in the sample 
  1089.    program):
  1090.    
  1091.    1. "Enter Choice"
  1092.    -----------------
  1093.    
  1094.    This is the old-style menu where you just list choices on the 
  1095.    screen and ask the user to enter a number or letter in a GET. 
  1096.    Although still serviceable, they were starting to look archaic 
  1097.    even on the PC, so they probably ought to be changed sometime 
  1098.    anyway. They'll work on the Mac with no changes.
  1099.    
  1100.    2. @...Menu / Read Menu To
  1101.    --------------------------
  1102.    
  1103.    For independent popup menus. Although supported, this does not 
  1104.    produce the same effect on a Mac as on the PC. On the PC it 
  1105.    produces a boxed menu, with optional title, and all menu options 
  1106.    showing at once. On the Mac the box is different, the title (if 
  1107.    any) does not appear, and only one option shows at first. If you 
  1108.    click on this option and pull down, the other options are 
  1109.    revealed and stay there until you make a choice. It's kind of 
  1110.    cute in it's own way -- but it *is* different from what you'd 
  1111.    expect. 
  1112.    
  1113.    3. @...Prompt / Menu To
  1114.    -----------------------
  1115.    
  1116.    Bar highlight menus. All my PC menus were done this way and I was 
  1117.    very relieved to discover that this option was finally supported. 
  1118.    I think the Mac version is pretty darned adorable, too, and even 
  1119.    more useful than before. When you use the mouse, you see a cute 
  1120.    little hand pointing to the options as they're highlighted. 
  1121.    Otherwise, the bars work the same with arrow keys. On the PC, the 
  1122.    user had only two choices for selecting an option: move bar and 
  1123.    press <ENTER> or press the first letter of the option choice. 
  1124.    Now, there's an additional option to double click on the option 
  1125.    with the mouse (oddly Foxpro only requires one click so moving 
  1126.    back and forth between the two can be confusing). 
  1127.    
  1128.    4. Read Menu Bar To
  1129.    -------------------
  1130.    
  1131.    I didn't find out that this was *in fact* supported until I was 
  1132.    working on this presentation and I was annoyed that I didn't know 
  1133.    sooner. Not only is it supported, but it also can use almost all 
  1134.    the ON MENU options like keyboard shortcuts, and fancy 
  1135.    formatting. However, there are a few things to watch out for:
  1136.    
  1137.    *  Since the Mac menu bar always includes the Apple menu, the 
  1138.    File menu and the Edit menu, you may not be able to include as 
  1139.    many options as you can with READ MENU BAR TO on the PC. When 
  1140.    translated to the Mac, upper case letters no longer look good in 
  1141.    the font that FoxBASE+/Mac uses for this kind of menu. Indeed 
  1142.    they take up a lot of space. You can actually get another menu 
  1143.    bar option or two simply by changing menu options to 
  1144.    capitalized/lower case combinations.
  1145.    
  1146.    *  The Mac menus allow all sorts of fancy formatting, separating 
  1147.    lines, and the installation of keyboard shortcut keys. The sample 
  1148.    program uses all of these. See the instructions for the ON MENU 
  1149.    command for how to do this.
  1150.    
  1151.    *  The menu is no longer "sticky" -- it won't stay down, but must 
  1152.    be pulled down. A return to the menu does not take it back to 
  1153.    where it was -- the choice must be made by clicking and pulling 
  1154.    all over again. 
  1155.    
  1156.    *  While on the PC, you could select an option from the drop down
  1157.    menu by pressing the first letter of an option -- that doesn't 
  1158.    work any more. You have to make do with "keyboard shortcuts." 
  1159.    Unfortunately, there aren't as many available keys because each 
  1160.    keyboard shortcut letter can only have one purpose on the entire 
  1161.    menu -- not depending on which submenu you're in. 
  1162.    
  1163.    *  Since the "/" now denotes a hot key or keyboard shortcut, 
  1164.    these characters must be removed from any existing choices.
  1165.    
  1166.    *  In order to avoid, in any way I can, any possibility of event 
  1167.    driven programming, I always turn off the menus before processing 
  1168.    any selections with the command MENU OFF [MENU NUMBER] for each 
  1169.    menu on the top bar. When this is done, the menu at the top is 
  1170.    grayed out. A user can still see what the options are -- they'll 
  1171.    just be gray.
  1172.    
  1173.    *  The explanatory messages that used to be stored in the top 
  1174.    menu item arrays and displayed on the screen, no longer show up 
  1175.    at the bottom of the screen. However, one nice thing about this 
  1176.    menu on the Mac is that you can put informative comments on the 
  1177.    screen. A quick guide to the keyboard shortcuts would probably be 
  1178.    appreciated. 
  1179.    
  1180.    J. Printing
  1181.    -----------
  1182.    
  1183.    "Abandon all hope, ye who enter here."
  1184.    
  1185.    Without any doubt, the most difficult thing to convert to a Mac 
  1186.    is printing. It is to know the Pit of Despair, the Slough of 
  1187.    Despond. As a reference, I figured all this out last November. 
  1188.    Then when I was preparing this presentation, I had to figure it 
  1189.    out *all over again*. It seems that back in November, I managed 
  1190.    to get some things right *completely by accident*. The printing 
  1191.    programs in the sample program took me 3 whole days to figure out 
  1192.    -- even though I basically knew what I needed to do. So tread 
  1193.    warily and hope (knock wood) that your application doesn't have a 
  1194.    need for any of the really tricky things.
  1195.    
  1196.    Update note: The primary reason for all this difficulty is that 
  1197.    several common PC printing code sequences *do not work* on the 
  1198.    Mac and the work arounds are tough. 
  1199.    
  1200.    1. WYSIWYG 
  1201.    ----------
  1202.    
  1203.    Basically, with the Mac, what you see on the screen is what gets 
  1204.    printed -- this enables it to print all those fancy fonts and 
  1205.    pictures. It also means that you have to be conscious of the 
  1206.    interrelationship between what's on the screen and what comes out 
  1207.    on paper.
  1208.    
  1209.    Fonts on Screen/Fonts on Paper -- As I discussed in the Screens 
  1210.    section, a good font to use on the Mac is nine point Monaco. 
  1211.    However, this is smaller than the 10 characters per inch PC 
  1212.    standard. Consequently, if you use this as the screen font 
  1213.    throughout your program, 80 column reports will not extend across 
  1214.    the full width of the page. Similarly, if you need something to 
  1215.    print in condensed print, this font will be too big for an 135 
  1216.    column row to print on one line.
  1217.    
  1218.    To adjust the font on the printed page, use the SCREEN command to 
  1219.    choose a new *screen* font, perhaps a 12 point Courier. 
  1220.    Unfortunately, emulating condensed print is harder. You can set 
  1221.    the screen font to a 5 or 6 point Monaco, but this point size 
  1222.    will not print very nicely. That is because this particular size 
  1223.    of the font doesn't normally come with a Macintosh so the 
  1224.    computer "approximates" it, which unpleasant results. The only 
  1225.    way around this using standard Mac printing is for you (and your 
  1226.    users) to buy a smaller point size of a font for this purpose 
  1227.    (you all have to buy the *same* font, too).
  1228.    
  1229.    When you use the SCREEN command to set a printer font, this will 
  1230.    also affect anything printed to the screen while it's in effect. 
  1231.    You may have to be careful about this. 
  1232.    
  1233.    When printing is done, be sure to set the screen font back to the 
  1234.    one you want (watch out for printing routine exits).
  1235.    
  1236.    Column Alignment -- When converting from a PC program, I always 
  1237.    recommend that you use an fixed-width. If you print with a 
  1238.    proportional font (and they *do* look nice), columns may not line 
  1239.    up properly, depending on how you wrote your code. With a 
  1240.    proportional font, the following code will line up in columns 
  1241.    correctly:
  1242.    
  1243.    @ 1,0 say var1
  1244.    @ 1,10 say var2
  1245.    @ 1,20 say var3
  1246.    
  1247.    However, the following code will not:
  1248.    
  1249.    @ 1,0 say var1+'   '+var2+'   '+var3
  1250.    
  1251.    2. Set Printer To
  1252.    -----------------
  1253.    
  1254.    Another vagary of Mac printing is that it will not eject a page 
  1255.    until it receives an order to do so. FoxBASE+/Mac documentation 
  1256.    says that you must issue a SET PRINTER TO or SET PRINT OFF 
  1257.    statement after every printing job where a SET DEVICE TO PRINT or 
  1258.    SET PRINT ON statement has been issued. Luckily, I discovered 
  1259.    that EJECT works too for standard reports. Really luckily, I 
  1260.    discovered that almost all my printing jobs issued explicit 
  1261.    ejects. 
  1262.    
  1263.       Note: EJECT in DOS works whether the device is set to print or 
  1264.    not, but in the Mac, SET DEVICE TO PRINT must be in effect.
  1265.    
  1266.    But say you have a PC program that prints on odd sized forms 
  1267.    (postcards, for example). This kind of program would not issue an 
  1268.    eject because you don't want the page to advance a full 11 inches 
  1269.    after each postcard. One way of handling this in the PC is to 
  1270.    have a continuously incrementing counter (so that the counter is 
  1271.    never reset to -0-). If you try this on the Mac, none of the 
  1272.    postcards will print until you try another printing job or turn 
  1273.    off the computer (then they all come pouring out). I don't have 
  1274.    any idea where all the information is being kept (I'd have to 
  1275.    guess memory), so if it's a lot of data, you might run into other 
  1276.    problems.
  1277.    
  1278.    Now, as far as odd sized forms and labels are concerned, I think 
  1279.    you can do something with the "Page Size" option in the Mac "File 
  1280.    Menu." But I never could figure it out (and I understand it only 
  1281.    works with the Imagewriter). It's something I still don't get. If 
  1282.    you do manage to figure it out, I think you'll have to stick a 
  1283.    SET PRINTER TO or EJECT in after each form, but, again, I don't 
  1284.    know. In fact, printing became so totally frustrating, that I 
  1285.    completely abandoned standard Mac printing and tried an 
  1286.    alternative approach which I'll describe now. 
  1287.    
  1288.    3. Really Irritating Problems
  1289.    -----------------------------
  1290.    
  1291.    As far as I can tell, there are some printing jobs that simply 
  1292.    *cannot* be handled by standard Mac printing. In addition, 
  1293.    standard Mac printing is slow by PC standards. My application 
  1294.    pours out some huge reports that already may take an hour or more 
  1295.    to print, even to a spooler. My users want speed not beauty. So I 
  1296.    finally hit upon a way of printing that solved all my needs. 
  1297.    
  1298.       Remember this presentation is about PC to Mac conversions. 
  1299.    Presumably a lot of the following problems could be handled by 
  1300.    redoing everything with the Mac's label and report writers. But 
  1301.    that's going to take a lot of time, and, in some cases, *still* 
  1302.    won't work.
  1303.    
  1304.       Update note: Although the the label and report writers may 
  1305.    work, you should know that you must develop a report form for 
  1306.    *each* printer your program may use -- so you may need 
  1307.    multiple .FRX files.
  1308.    
  1309.       Note: This discussion is based on an Imagewriter plugged 
  1310.    directly into the computer in use -- further fiddling may be 
  1311.    necessary for other printers and networks. I've had reports that 
  1312.    some programmers have not been able to make this work on non-
  1313.    Imagewriter printers. 
  1314.    
  1315.       Update note: As I was working on this part of the presentation 
  1316.    for the umpteenth million time, I found out that my approach will 
  1317.    not work when printing via network and requires a printer plugged 
  1318.    into the local workstation. 
  1319.    
  1320.    The two main problems are:
  1321.    
  1322.    *  Characters/lines per inch problems, including printing on 
  1323.    pre-printed forms where precise placement is a requirement and 
  1324.    also including the problem with condensed type.
  1325.    
  1326.       Update note: The reason for this problem is that I was unable 
  1327.    to find a font that "comes with" the Mac which places things in 
  1328.    exactly the correct place (horizontally *and* vertically) on 
  1329.    invoice forms. The Mac's font line spacing is a function of the 
  1330.    font size and everything is measured in points, not lines per 
  1331.    inch.
  1332.    
  1333.    *  "Real Time" printing -- where you want something to print 
  1334.    immediately without advancing the page. For example, you might 
  1335.    want to print a sample label or form, pause to allow the user to 
  1336.    align the forms stock, and resume -- the next line to print must 
  1337.    print immediately at the new position. Or you may want to print 
  1338.    line by line as the user enters data without advancing the page.
  1339.    
  1340.    I'm going to try to explain these problems, and their solutions, 
  1341.    as simply as possible, but it's a very difficult area. Perhaps 
  1342.    your best bet is to run the sample program and read the code 
  1343.    carefully (I've included additional comments there). But, 
  1344.    frankly, all I'm hoping is that I can steer you in approximately 
  1345.    the right direction. 
  1346.    
  1347.    Override Mac Printing
  1348.    ---------------------
  1349.    
  1350.    In order to solve both these problems, the first step is to 
  1351.    override the Mac's printer drivers and communicate directly with 
  1352.    the printer. This setup drives the printer directly, like DOS 
  1353.    does. This is accomplished by setting the printer to the serial 
  1354.    port by issuing the command:
  1355.    
  1356.    SET PRINTER TO COM2 (or COM1)
  1357.    
  1358.    COM2 is the printer port and COM1 is the modem port. Printers can 
  1359.    be plugged into either outlet so you need to adjust this command 
  1360.    accordingly.
  1361.    
  1362.    Foxbase+/Mac uses the baud, parity, stopbits, databits handshake 
  1363.    and endline settings for the Imagewriter as its default. If 
  1364.    another printer is used, it may be necessary to specify these 
  1365.    settings in the command:
  1366.    
  1367.    SET PRINTER TO COM2 BAUD, PARITY, STOPBITS, DATABITS, ; 
  1368.        HANDSHAKE, ENDLINE
  1369.    
  1370.    A sample of this command is included in the sample program.
  1371.    
  1372.    Note: If you use SET PRINTER TO anywhere else in your program to 
  1373.    eject a page, you'll overwrite your settings here -- so be 
  1374.    careful with it.
  1375.    
  1376.    If an application will be distributed to users with a variety of 
  1377.    printers, it may be necessary for you to write a printer set up 
  1378.    program for the user to provide your program with the baud rate, 
  1379.    etc. plus the proper escape sequences for various tasks (see 
  1380.    below) for their printer. This is also handy if you want the user 
  1381.    to be able to set the type size within the application (and may 
  1382.    be necessary if the user turns off the printer and erases the 
  1383.    current setting).
  1384.    
  1385.    Warning!!: If the user *does* turn off the printer in the middle 
  1386.    of a print job, characters/lines per inch settings will be erased 
  1387.    *and* the "Printer Not Ready Error" will not be triggered as 
  1388.    happens in DOS. The Mac will just "print" merrily away until the 
  1389.    code runs out. Users might get cranky about this, especially when 
  1390.    the Imagewriter eats their invoice forms and they have to wait 
  1391.    for "printing" to end as well as start all over again. 
  1392.    
  1393.    Characters/Lines Per Inch
  1394.    -------------------------
  1395.    
  1396.    Once the printer is set to a COM port, the characters per inch 
  1397.    and lines per inch settings can be sent directly to the printer 
  1398.    using the printer's escape sequences.
  1399.    
  1400.    For the Imagewriter, the following lines of code set the type 
  1401.    size to Pica (10 characters per inch) and 6 lines to the inch:
  1402.    
  1403.    SET PRINT ON
  1404.    ?? CHR(27)+"N"
  1405.    ?? CHR(27)+"A"
  1406.    SET PRINT OFF
  1407.    
  1408.    For condensed type (17 characters per inch):
  1409.    
  1410.    SET PRINT ON
  1411.    ?? CHR(27)+"Q"
  1412.    SET PRINT OFF
  1413.    
  1414.    With condensed type there is an additional proviso: the screen 
  1415.    font must *still* be changed to a font size that would allow 
  1416.    printing a complete row on a page, even though, in this case, the 
  1417.    screen font has no effect on the size or appearance of what 
  1418.    actually prints (does this drive you crazy or what?) I use 4 
  1419.    point Monaco. 
  1420.    
  1421.    Update note: This problem with condensed type also applies when 
  1422.    printing to a *file*.
  1423.    
  1424.    Real Time Printing
  1425.    ------------------
  1426.    
  1427.    First the problem: when using PC code and Mac standard printing, 
  1428.    the Mac will not simply print one form (label, invoice, etc.) and 
  1429.    allow the user to pause and realign the forms stock. 
  1430.    For example, the following code, using the ? command, is common:
  1431.  
  1432.    SET PRINT ON
  1433.    ? "This was printed using ?"
  1434.    SET PRINT OFF
  1435.    
  1436.    In standard Mac printing, this will print a label and eject the 
  1437.    page. 
  1438.    
  1439.    The following code, using the @..SAY command is also common:
  1440.    
  1441.    SET DEVICE TO PRINT
  1442.    @ PROW(),1 SAY "This was printed using @ SAY"
  1443.    SET DEVICE TO SCREEN
  1444.    
  1445.    This won't print anything on the printer -- it's stored somewhere 
  1446.    awaiting a SET PRINT TO or EJECT command, which when received, 
  1447.    will again eject the whole page. 
  1448.    
  1449.    However, by setting the printer to the COM port and fiddling with 
  1450.    the code, you can produce the effect you want. 
  1451.    
  1452.    The following code does this (it's from the sample program):
  1453.    
  1454.    *** using the ? command
  1455.    set print on
  1456.    ?? 'This was printed using ?'
  1457.    ? 'line2'
  1458.    ? 'line3'
  1459.    ? 'line4'
  1460.    ? 'line5'
  1461.    ? 'line6'
  1462.    set print off
  1463.    *** pause to allow user to align the form
  1464.    CNTR=1
  1465.    do while CNTR<=15
  1466.     set print on
  1467.     if MMAC
  1468.       pcol=0
  1469.       ?? 'This was printed using?' && The reason for this code on 
  1470.                                    && the Mac is a little difficult 
  1471.                                    && to explain. OK, I don't *know*
  1472.                                    && why it works, it just does and
  1473.                                    && at this point I don't care
  1474.                                    && anymore. So sue me.
  1475.       else
  1476.         ? 'This was printed using ?'
  1477.       endif
  1478.       ? 'line2'
  1479.       ? 'line3'
  1480.       ? 'line4'
  1481.       ? 'line5'
  1482.       ? 'line6'
  1483.       CNTR=CNTR+1
  1484.       set print off
  1485.    enddo
  1486.    *** using @..SAY
  1487.    set device to print
  1488.    set print on
  1489.    store 0 to CNTR2
  1490.    @ CNTR2,0 say  'This was printed using @ SAY'
  1491.    @ CNTR2+1, 0 say 'line2'
  1492.    @ CNTR2+2, 0 say 'line3'
  1493.    @ CNTR2+3, 0 say 'line4'
  1494.    @ CNTR2+4, 0 say 'line5'
  1495.    @ CNTR2+5, 0 say 'line6'
  1496.    ?
  1497.    if MMAC
  1498.       CNTR2=0                       && with incrementing counters on 
  1499.                                     && the Mac reset counter to 0 
  1500.                                     && each time   
  1501.    else
  1502.       CNTR2=CNTR2+6
  1503.    endif
  1504.    set device to screen           && the SET DEVICE TO SCREEN and
  1505.    set print off                  && SET PRINT OFF commands must be                                      
  1506.                                   && exactly in this order to work
  1507.    *** pause for user to align forms
  1508.    if .not. MMAC
  1509.      set console off                     && saves screen scrolling 
  1510.    on the PC
  1511.    endif
  1512.    store 1 to CNTR
  1513.    do while CNTR<=15
  1514.       set device to print       && both these commands are necessary
  1515.       set print on              && for Mac to allow use of ?
  1516.       @ CNTR2,0 say  'This was printed using @ SAY'
  1517.       @ CNTR2+1, 0 say  'line2'
  1518.       @ CNTR2+2, 0 say 'line3'
  1519.       @ CNTR2+3, 0 say 'line4'
  1520.       @ CNTR2+4, 0 say 'line5'
  1521.       @ CNTR2+5, 0 say 'line6'
  1522.       ?
  1523.       CNTR=CNTR+1
  1524.       if MMAC
  1525.         CNTR2=0                 && because prow() = 0
  1526.       else
  1527.         CNTR2=CNTR2+6
  1528.       endif                     && for real time printing:
  1529.       set device to screen      && <=both these commands are 
  1530.       set print off             && <=necessary and exactly in this 
  1531.                                 && order even if you aren't 
  1532.                                 && returning to the screen at this 
  1533.                                 && moment
  1534.    enddo
  1535.    set console on
  1536.    
  1537.    Three things to note: -- First, if you use incrementing counters, 
  1538.    as in the example immediately above, you will need to reset the 
  1539.    counter to 0 before printing the next label since PROW() is reset 
  1540.    to 0 each time. 
  1541.  
  1542.    Second, if an address does not take up the entire label (say it's 
  1543.    only 4 lines long), you will need to position the printer at the 
  1544.    last row of the label, either by issuing additional ? commands or 
  1545.    saying @ cntr+5, 28 SAY "" (before issuing the ? command). 
  1546.    
  1547.    Update note: In DOS you can produce blank lines with the ? 
  1548.    command. Three ? commands will produce 3 blank lines -- on the 
  1549.    Mac they produce only *one*. To make this work, you need to 
  1550.    change the command to ? " ".
  1551.    
  1552.    Third, the SET DEVICE TO SCREEN and SET PRINT OFF commands must 
  1553.    be issued in exactly that order to work.
  1554.    
  1555.    Similar code will also handle odd page lengths. In my case, I 
  1556.    needed to print on an invoice form that was 7 inches long  -- 42 
  1557.    rows (rows 0 through 41). Here again it is necessary to issue an 
  1558.    @ SAY to position the printer at the last row of the form before 
  1559.    issuing ?? (or ?):
  1560.    
  1561.    SET DEVICE TO PRINT
  1562.    SET PRINT ON
  1563.    cntr=0
  1564.    @ cntr+1,1 SAY "INVOICE ELEMENT"     && 7 inch form
  1565.    @ cntr+2,1 SAY "INVOICE ELEMENT"     && 6 lines/inch
  1566.    @ cntr+3,1 SAY "INVOICE ELEMENT"     && rows 0-42
  1567.    [additional commands]
  1568.    @ cntr+41,1 say " "                  && position the printer
  1569.                                         && on last line of form
  1570.    ??                                   && ?? works like ?
  1571.    SET DEVICE TO SCREEN
  1572.    SET PRINT OFF
  1573.    
  1574.    Once again, for a demonstration of these concepts and additional 
  1575.    comments, see the sample program. 
  1576.    
  1577.    IV. EASY MAC-LOOK ENHANCEMENTS
  1578.    ==============================
  1579.    
  1580.    Once you've dealt with all the preceding details and *if* you 
  1581.    have the strength left, there are several easy things you can do 
  1582.    to make your program more Mac-like.
  1583.    
  1584.    1. Help
  1585.    -------
  1586.    
  1587.    Probably one of the nicest things you could do is to substitute 
  1588.    FoxBASE+/Mac's on line help for the way you do help now. However, 
  1589.    this can be very tedious if your help is hardcoded (mine was). 
  1590.    Personally, I'm developing this kind of help in Foxpro and will 
  1591.    port it to the Mac when the time comes. If you don't use Mac 
  1592.    help, you should SET HELP OFF in your program so that nothing 
  1593.    will happen if the user chooses this option from the Apple menu.
  1594.    
  1595.    2. About Your Program
  1596.    ---------------------
  1597.    
  1598.    It would be nice to replace the "About FoxBASE+" option in the 
  1599.    Apple menu with an "About Your Program" option. However, this 
  1600.    does not seem possible if you're using DOS based menus. However, 
  1601.    you *can* make the "About FoxBASE+" message disappear. Indeed, 
  1602.    you can disable the entire Apple menu if you want to. See sample 
  1603.    program for how this works.
  1604.    
  1605.    3. Alerts
  1606.    ---------
  1607.    
  1608.    Alerts are really easy to program and add a nice touch. See 
  1609.    sample program and Commands and Functions manual.
  1610.    
  1611.    4. Wait
  1612.    -------
  1613.    
  1614.    On the PC, the default message for a WAIT command is "Press any 
  1615.    key to continue." On the Mac it's "Waiting" which I don't like as 
  1616.    much. You might want to initialize a WAIT prompt in your code and 
  1617.    use it whenever you use a WAIT. See sample program -- in the 
  1618.    Screen Examples procedure, you can see the waiting message 
  1619.    change. 
  1620.    
  1621.    5. Mouse vs Keyboard
  1622.    --------------------
  1623.    
  1624.    Although the Mac is very mouse oriented, people still have to 
  1625.    enter data with their fingers. That's one of the reasons I don't 
  1626.    like Mac menus. I try to set up a program so that it can be just 
  1627.    as easily navigated via the keyboard as with the mouse. And I 
  1628.    find that for some tasks, like selecting reports to print, I use 
  1629.    the mouse, and for other tasks, like adding accounts, I prefer to 
  1630.    navigate continuously with the keyboard. 
  1631.    
  1632.    From a PC perspective, don't forget about mouse navigation. 
  1633.    Although I didn't really deal with this well in my conversion, it 
  1634.    should be possible for users to choose as many options as 
  1635.    possible with a mouse *as well* as the keyboard. Look especially 
  1636.    for areas (like report printing) where the mouse might be the 
  1637.    easiest tool, and make changes there first.
  1638.    
  1639.    V. MISCELLANEOUS CONSIDERATIONS
  1640.    ===============================
  1641.    
  1642.    Testing -- Although it's the last thing you want to do, I'd 
  1643.    advise testing *everything* in your program again once the Mac 
  1644.    conversion is complete. I discovered all sorts of little odds and 
  1645.    ends (which you now know about) in the process. It's entirely 
  1646.    possible that there are some quirks that I didn't find (and I was 
  1647.    finding quirks right up to the last minute while preparing this 
  1648.    presentation). Caveat developer.
  1649.    
  1650.    Distribution -- Obviously, PC batch files don't work anymore for 
  1651.    automatic installation purposes. There isn't, as far as I've 
  1652.    found, a Mac equivalent. STUFFIT is the Mac equivalent for PKZip 
  1653.    and there are two self-installing utilities available. I haven't 
  1654.    had time to experiment with these, but Foxbase+/Mac uses a 
  1655.    variation of this software to install itself. 
  1656.    
  1657.    Preparing a runtime application is a little tricky. You can read 
  1658.    up on it in the Users Guide. 
  1659.    
  1660.    Documentation -- Is, as usual, a pain. Since with a basic 
  1661.    conversion, you won't be changing the screen appearances too 
  1662.    much, most of your PC documentation will work as is. However, I 
  1663.    had to write new installation instructions, change a few screen 
  1664.    shots (especially where editing memo fields was concerned), and 
  1665.    add on some information about using the mouse etc. 
  1666.    
  1667.    Screen shots were kind of nice. On the Plus, by pressing 
  1668.    Command-Shift-3 (with Caps Lock on), a picture of the screen is 
  1669.    saved in Mac Paint format on the hard disk. These pictures are 
  1670.    called Screen 0, Screen 1, etc. in the order they're produced. I 
  1671.    was able to port them over to the PC and load them straight into 
  1672.    Ventura. Piece of cake! Unfortunately, they made my old PC 
  1673.    screens look kind of anemic.
  1674.    
  1675.    VI. OTHER TOPICS
  1676.    ================
  1677.    
  1678.    Backward Compatibility -- Compatibility backward from the Mac to 
  1679.    the PC is a little difficult at this time -- but I have reason to 
  1680.    believe that will change as Foxpro handles more and more of the 
  1681.    Mac commands.
  1682.    
  1683.    *  Unsupported commands and functions -- With FoxBASE+, there are 
  1684.    a lot of Mac commands that aren't supported on the PC, notably 
  1685.    the ones that generate radio buttons and such, but also such 
  1686.    basics as SCREEN. In order to port to the PC, you'd have to make 
  1687.    a very thorough analysis of what's available *on* the PC.
  1688.    
  1689.    *  Form design -- Definitely the only way to go in designing 
  1690.    screens for the Mac is the Mac's forms design feature. You can 
  1691.    use it to produce a format file and then integrate it into your 
  1692.    program. Unfortunately, it does *not* have a character based 
  1693.    option and figures everything out in pixels which won't work on 
  1694.    the PC. It also generates a very great deal of extraneous code 
  1695.    (in most situations) that will quickly bulk up your application 
  1696.    if you don't strip it out (which is tiresome). There are some 
  1697.    examples of the code it produces in the sample program.
  1698.    
  1699.    *  Dos file conventions -- when developing on the Mac, use Dos 
  1700.    file conventions.
  1701.    
  1702.    *  Path/file naming -- watch out for colons in your path names or 
  1703.    searching for colons in path names for certain purposes.
  1704.    
  1705.    *  The Future -- FoxPro/Mac. You probably know as much about this 
  1706.    as I do. I think that FoxPro and FoxPro/Mac will become very 
  1707.    close with each one supporting the command sets of the other. We 
  1708.    will have to see, otherwise I'm going to end up making a career 
  1709.    out of this presentation and I'd just as soon be programming 
  1710.    instead. There are some products available now, notably Code in a 
  1711.    Flash by Flash Creative Mangement that will write your screen 
  1712.    code in either Mac or FoxPro at, I'm told, the touch of a button. 
  1713.    Y. Alan Griver will gladly fill you in on this. 
  1714.    
  1715.    The Sample Program -- The sample program -- PC2MAC.PRG -- is 
  1716.    written to run on either a PC or a Mac and to demonstrate the 
  1717.    topics that have been discussed in this presentation. Menus, 
  1718.    screen examples, and printing are included plus little odds and 
  1719.    ends that were fun to throw in. The code is heavily commented and 
  1720.    touches on one or two points not covered here. 
  1721.    
  1722.    
  1723.